<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="/static/common/layui/css/layui.css" media="all">
    <style type="text/css">
        .layui-upload-img {
            width: 92px;
            height: 92px;
            margin: 0 10px 10px 0;
        }

        .site-block {
            width: 600px;
            padding: 20px;
            border: 2px solid #eee;
        }

        .site-text {
            position: relative;
        }

        .title-location {
            font-size: 20px;
            font-weight: 600;
        }

        .rightlayer {
            display: inline-block;
        }
    </style>
</head>
<body style="margin: 20px 20px ">
<div class="site-text site-block ">
    <button class="layui-btn layui-btn-primary" onclick="index()">首页生成</button>
    <button class="layui-btn layui-btn-primary" onclick="housedetails()">房源详情页生成</button>
    <button class="layui-btn layui-btn-primary" onclick="stationdetails()">工位详情页生成</button>
    <button class="layui-btn layui-btn-primary" onclick="newsdetails()">资讯详情页生成</button>
</div>
</body>
<script type="text/javascript" src="/static/common/js/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="/static/common/layui/layui.all.js"></script>
<script type="text/javascript">
    function index() {
        var index = layer.msg('首页生成中...', {icon: 16, shade: 0.6, time: 100000});
        $.post('/htmlCreate/html/ajxaCreate.do', {pageType: index}, function (res) {
            layer.close(index);
            if (res.data == true) {
                layer.msg('生成成功!', {icon: 1});
            } else {
                layer.msg('生成失败!', {icon: 2});
            }
        }, 'json');
    }
//    function housedetails() {
//        var index = layer.msg('详情页生成中...', {icon: 16, shade: 0.6, time: 100000});
//        $.post('/htmlCreate/html/ajxaCreateHouse.do', {pageType: 1}, function (res) {
//            layer.close(index);
//            if (res.data == true) {
//                layer.msg('生成成功!', {icon: 1});
//            } else {
//                layer.msg('生成失败!', {icon: 2});
//            }
//        }, 'json');
//    }
//    function stationdetails() {
//        var index = layer.msg('工位详情页生成中...', {icon: 16, shade: 0.6, time: 100000});
//        $.post('/htmlCreate/html/ajxaCreateStation.do', {pageType: 1}, function (res) {
//            layer.close(index);
//            if (res.data == true) {
//                layer.msg('生成成功!', {icon: 1});
//            } else {
//                layer.msg('生成失败!', {icon: 2});
//            }
//        }, 'json');
//    }
//
/*    function newsdetails() {
        var index = layer.msg('新闻/资讯详情页生成中...', {icon: 16, shade: 0.6, time: 100000});
        $.post('/htmlCreate/html/ajxaCreateNews.do', {pageType: 1}, function (res) {
            layer.close(index);
            if (res.data == true) {
                layer.msg('生成成功!', {icon: 1});
            } else {
                layer.msg('生成失败!', {icon: 2});
            }
        }, 'json');
    }*/
</script>
</html>